#include "Kernel_PCH.h"
#include "Timer.h"

/*--------------------------------------------------------------------------*/

Timer::Timer()
{

}

/*--------------------------------------------------------------------------*/

Timer::~Timer()
{

}

/*--------------------------------------------------------------------------*/

void Timer::ResetTimer()
{
	QueryPerformanceFrequency(&m_freq);
	QueryPerformanceCounter(&m_sc);
}

/*--------------------------------------------------------------------------*/

float Timer::GetTime_ms()
{
	QueryPerformanceCounter(&m_c);

	return (float)((__int64) m_c.QuadPart - (__int64) m_sc.QuadPart) * 1000.0f / (float)(m_freq.QuadPart);
}

/*--------------------------------------------------------------------------*/